package com.example.speech_recognition.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.example.speech_recognition.R;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private Button btn_speech;
    private Button btn_recognition;
    private Button btn_face;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView() {
        btn_speech = (Button) findViewById(R.id.btn_speech);
        btn_recognition = (Button) findViewById(R.id.btn_recognition);
        btn_face = (Button) findViewById(R.id.btn_face);

        btn_speech.setOnClickListener(this);
        btn_recognition.setOnClickListener(this);
        btn_face.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_speech:
                startActivity(new Intent(MainActivity.this,SpeechActivity.class));
                break;
            case R.id.btn_recognition:
                startActivity(new Intent(MainActivity.this,RecognitionActivity.class));
                break;
            case R.id.btn_face:
                startActivity(new Intent(MainActivity.this,FaceActivity.class));
                break;
        }
    }
}
